package com.cskaoyan.mall.pay.converter;

import com.cskaoyan.mall.pay.dal.entitys.Payment;
import com.cskaoyan.mall.pay.form.PaymentRequest;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * @author ：HsDsg
 * @date ：2022/8/28 17:42
 * @description：TODO
 */

@Mapper(componentModel = "spring")
public interface PaymentToPaymentRequest {

    @Mapping(source = "info",target ="productName" )
    @Mapping(source = "money",target ="orderAmount" )
    @Mapping(source = "userId",target ="payerUid" )
    @Mapping(source = "nickName",target ="payerName" )
    @Mapping(source = "payType",target ="payWay" )
    Payment payment(PaymentRequest paymentRequest);
}
